import {post, get} from '@/utils/request'

const addBlog = params => post('/blog/add', params)
const updateBlog = params => post('/blog/update', params)
const deleteBlog = (params) => get(`/blog/delete/${params.id}`)
const getBlog = (params) => get(`/blog/${params.id}`)
const listBlog = () => get('/blog/list')
const pageBlog = (params) => get(`/blog/page/${params.topicId}/${params.pageNum}/${params.pageSize}`)

export {
  listBlog,
  pageBlog,
  deleteBlog
}
